using System;
using System.Collections.Generic;
using System.Text;
using System.Net;

using NSimpleDB.Service.Contract;

namespace NSimpleDB.Service.Amazon.Dashboard
{
    internal class SimpleDBResponseMetaData : ISimpleDBResponseMetaData
    {
        private string requestId, boxUsage;

        public SimpleDBResponseMetaData(string requestId, string boxUsage)
        {
            this.boxUsage = boxUsage;
            this.requestId = requestId;
        }

        #region ISimpleDBResponseMetaData Members
        public string BoxUsage
        {
            get { return this.boxUsage; }
        }

        public string RequestId
        {
            get { return this.requestId; }
        }
        #endregion
    }


    internal class SimpleDBExceptionData : SimpleDBResponseMetaData, ISimpleDBExceptionData
    {
        private string errorCode, errorType, message, xml;
        private HttpStatusCode statusCode;


        public SimpleDBExceptionData(string errorCode, string errorType, string message, string xml, HttpStatusCode statusCode, string requestId, string boxUsage)
            : base(requestId, boxUsage)
        {
            this.errorCode = errorCode;
            this.errorType = errorType;
            this.message = message;
            this.xml = xml;
            this.statusCode = statusCode;
        }


        #region ISimpleDBExceptionData Members
        public string ErrorCode
        {
            get { return this.errorCode; }
        }

        public string ErrorType
        {
            get { return this.errorType; }
        }

        public string Message
        {
            get { return this.message; }
        }

        public string Xml
        {
            get { return this.xml; }
        }

        public System.Net.HttpStatusCode StatusCode
        {
            get { return this.statusCode; }
        }
        #endregion
    }
}
